﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Threading;
using System.Threading.Tasks;

namespace Zj.DDDSample.Domain.Events
{
    /// <summary>
    /// Event publisher interface
    /// </summary>
    public interface IEventPublisher
        :IDisposable
    {
        Task PublishAsync<TEvent>(TEvent @event,CancellationToken cancellationToken=default(CancellationToken))
            where TEvent:IEvent;
    }
}
